using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml.Serialization;

namespace CreamX.Framework.Game.GameEngine
{
    public class CreamXEngineSettings
    {
        public List<string> AssemblyFileNames = new List<string>();
        public bool IsFixedTimeStep;
        public GraphicsSettings WindowsGfxSettings;
        public GraphicsSettings XBOXGfxSettings;
        public static CreamXEngineSettings Load(string filename)
        {
            Stream stream = File.OpenRead(filename);
            XmlSerializer serializer = new XmlSerializer(typeof(CreamXEngineSettings));
            CreamXEngineSettings __settings =(CreamXEngineSettings)serializer.Deserialize(stream);
            return __settings;
        }

#if(XBOX)
        public GraphicsSettings CurrentGraphicsSettings
        {
            get
            {
                return this.XBOXGfxSettings;
            }
        }
#else
        public GraphicsSettings CurrentGraphicsSettings
        {
            get
            {
                return this.WindowsGfxSettings;
            }
        }
#endif

        
    }
    public class GraphicsSettings
    {
        public bool IsFullScreen;
        public int PreferredBackBufferWidth;
        public int PreferredBackBufferHeight;
        public bool VSyncOn=false;
    }
}
